﻿<Window x:Class="PocketBook.Views.StringListEditorView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Height="300" Width="360" MinWidth="360" MinHeight="400" WindowStartupLocation="CenterOwner" Title="Settings">
    <DockPanel Margin="4">
        <Grid DockPanel.Dock="Right" Margin="4,0,0,0">
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Grid.Resources>
                <Style TargetType="{x:Type Button}">
                    <Setter Property="MinWidth" Value="85" />
                </Style>
            </Grid.Resources>

            <StackPanel>
                <Button x:Name="Save" Content="OK" IsDefault="true" />
                <Button x:Name="Cancel" Content="Cancel" IsCancel="true" Margin="0,4,0,0" />
                <Button x:Name="MoveUp" Content="Move _Up" Margin="0,12,0,0" />
                <Button x:Name="MoveDown" Content="Move _Down" Margin="0,4,0,0" />
            </StackPanel>
        </Grid>
    
        <DataGrid CanUserAddRows="True" CanUserDeleteRows="True" CanUserResizeColumns="False" CanUserResizeRows="False" CanUserSortColumns="false"
                  AlternationCount="2" ItemsSource="{Binding Path=Settings}" AutoGenerateColumns="False" SelectedIndex="{Binding SelectionIndex}"
                  AlternatingRowBackground="AliceBlue" GridLinesVisibility="Horizontal" HorizontalGridLinesBrush="LightBlue">
            <DataGrid.Columns>
                <DataGridTextColumn Header="Item" Width="*" Binding="{Binding Text}" />
            </DataGrid.Columns>
        </DataGrid>
        
    </DockPanel>
</Window>
